package com.gugee.ins.common.dal.service.dic.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gugee.ins.common.dal.mapper.dic.InsDicLocationMapper;
import com.gugee.ins.common.dal.service.dic.InsDicLocationDao;
import com.gugee.ins.common.model.mysql.dic.InsDicLocation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * InsDicLocationDaoImpl
 *
 * @author Huangxin
 */
@Slf4j
@Service
public class InsDicLocationDaoImpl extends ServiceImpl<InsDicLocationMapper, InsDicLocation> implements InsDicLocationDao {
    /**
     * 根据 截取cityName获得的region搜索国家名称
     * @param region
     * @return
     */
    @Override
    public List<String> findNationByRegion(String region){
        return baseMapper.findNationByRegion(region);
    }

    /**
     * 根据 uid 查找location关系表 映射国家名称
     * @param uid
     * @return
     */
    @Override
    public List<String> findNationByUid(long uid) {
        return baseMapper.findNationByUid(uid);
    }
}
